(function () {
    tinymce.create('tinymce.plugins.ImageManager',
{ init: function (ed, url) {
    function isMceItem(n)
    { return /mceItem/.test(n.className) };
    ed.addCommand('mceImageManager', function () {
        var n = ed.selection.getNode(); if (n.nodeName == 'IMG' && isMceItem(n)) { return }
        ed.windowManager.open({
           //  file: url + '/FileManager.aspx',
             file: '/admin/filemanager',
            width: 780,
            height: 600,
            inline: 1,
            popup_css: false
        },
         {
             plugin_url: url
         })
    });
    ed.addButton('imgmanager',
     { title: 'Image Manager',
         cmd: 'mceImageManager',
         image: url + '/insertimage.gif'
     });

},
    getInfo: function () {
        return { longname: 'Image Manager',
            author: 'tuanitpro', authorurl: 'http://dalatxanh.net',
            infourl: 'http://dalatxanh.net', version: '1.0.0.0'
        }
    }
}); tinymce.PluginManager.add('imgmanager', tinymce.plugins.ImageManager)
})();